package com.ihr360.commons.model;


import com.ihr360.commons.model.entity.NumberId;

import java.util.ArrayList;
import java.util.List;

public abstract  class HierarchyEntityWithNumberId<T, ID extends Number> extends NumberId<ID> implements IHierarchyEntity<T,ID>{
    protected String indexno;
    public T parent;

    protected List<T> children = new ArrayList<>();

    @Override
    public String getIndexno() {
        return indexno;
    }

    public void setIndexno(String indexno) {
        this.indexno = indexno;
    }

    @Override
    public T getParent() {
        return parent;
    }

    @Override
    public void setParent(T parent) {
        this.parent = parent;
    }

    @Override
    public List<T> getChildren() {
        return children;
    }

    @Override
    public void setChildren(List<T> children) {
        this.children = children;
    }
}